from base.base import Base
from selenium.webdriver.common.by import By
from time import sleep
class Guanzhupage(Base):
    sosuuou = (By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/androidx.drawerlayout.widget.DrawerLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.RelativeLayout/android.widget.RelativeLayout[2]/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.TextSwitcher/android.widget.TextView')
    sousuoneitong = (By.ID,'com.xiachufang:id/search_edit_text')
    sousuoanniu = (By.XPATH,'//android.widget.TextView[@text="搜索"]')
    dianjishangp = 'new UiSelector().text("用户")'
    dy = (By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.view.ViewGroup/androidx.recyclerview.widget.RecyclerView/android.view.ViewGroup[1]/android.widget.LinearLayout/android.widget.TextView')
    def guanzhuyeuw(self,flie):
        self.loc_ele(self.sosuuou).click()
        sleep(2)
        self.loc_ele(self.sousuoneitong).send_keys(flie)
        sleep(2)
        self.loc_wait_ele(self.sousuoanniu).click()
        sleep(2)
        self.loc_ui_ele(self.dianjishangp).click()